#ifndef POLICY_FACTORY_H
#define POLICY_FACTORY_H

#include "policy/abstract_policy.h"

namespace policy
{
/**
 * @brief:  任务排布策略创建
 * @author: sherlock_lht
 */
template<class T>
class PolicyFactory
{
public:
    /**
     * @brief:  创建策略实例
     * @author: sherlock_lht
     */
    template<typename... Args>
    static AbstractPolicyConstPtr createPolicy(const std::string &name, Args... args)
    {
        return std::make_shared<T>(name, args...);
    }
};

}

#endif //POLICY_FACTORY_H
